{{include file="Manage/header.html"}}
<body class="login_body">

    <div class="login_header">
        <a href="javascript:">培育计划申报</a>
    </div>

    <div class="login">
        <form action="index.php?app=Login" name="myform" method="post" class="ajaxSubmit" onsubmit="return false">
            <div class="title">用户登录</div>
            <div class="message">
                <input type="text" name="username" placeholder="请输入姓名">
            </div>
            <div class="message">
                <input type="password" name="password" placeholder="请输入密码">
            </div>
            <div class="code">
                <input type="text" name="verify" class="verify" placeholder="请输入验证码">
                <i><img src='{{"index.php?app=Functions&act=getVerifyCode"|URL}}' onclick="this.src=this.src+'?'" style="cursor:pointer" class="change_verify"></i>
            </div>
        </form>
        <!-- <div class="warm">密码错误</div> -->
        <button onClick="login();">登录</button>
        <p class="warming"></p>
        <div class="note">
            <span><a href="index.php?app=Login&act=reset_password">忘记密码</a></span>
            <span><a href="index.php?app=Login&act=register">注册</a></span>
        </div>
    </div>
    <script type="text/javascript">

        //登录验证
        function login(){
            var params = $("form").serialize();
            $.post('{{"index.php?app=Login&act=login"|URL}}',params,function(result){
                if(result.statusCode=='200'){
                    var url = "{{$smarty.const.__PROJECT__}}Index/index"; 
                    document.location.href = url;//登录后跳转页面
                }else if(result.statusCode=='300'){
                    $(".warming").html(result.message);
                    $(".change_verify").trigger("click");
                    $(".verify").val("");
                }   
            },'json');
        };
    </script>



{{include file="Manage/footer.html"}}